<template>
	<view class="container">
		<view class="search">
			<uni-search-bar class="searchbar" @confirm="search" @input="input" v-model="searchValue" placeholder="搜索"
				cancelButton="none"></uni-search-bar>
		</view>
		<view class="servicelog" v-for="(item,index) in serverList" :key="index">
			<view class="serviceleft">
				<view class="device" v-if="item.workType == 0">设备安装</view>
				<view class="device" v-else-if="item.workType == 1">设备维修</view>
				<view class="detail">
					<view class="name">客户名称：{{item.userName}}</view>
					<view class="site">详细地址：{{item.userAddress}}</view>
					<view class="time">完成时间：{{item.updateTime}}</view>
				</view>
			</view>
			<view class="serviceright">
				<view class="xian">
				</view>
				<view class="statu">
					<view class="statu1" v-if="item.dealStatus == 0">未完成</view>
					<view class="statu1" v-else-if="item.dealStatus == 1">已完成</view>
					<view class="statu1" v-else>不予处理</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import $http from "@/ajax/http.js";
	export default {
		data() {
			return {
				serverList:[]
			}
		},
		onLoad() {
			this.getServiceInfoList();
		},
		methods: {
			getServiceInfoList() {
				$http.request({
					url: "/waiter/index/getServiceInfoList",
					method: 'GET'
				}).then((res) => {
					console.log(res, '服务信息列表');
					this.serverList = res
				})
			},
		}
	}
</script>




<style scoped lang='scss'>
	@import url('../../../common/sass/all/all.scss');

	.search {
		width: 715rpx;
		height: 73rpx;
		margin-bottom: 23rpx;
	}

	.servicelog {
		width: 677rpx;
		height: 205rpx;
		background-color: #FFFFFF;
		border-radius: 15rpx;
		margin-top: 18rpx;
		display: flex;
		flex-direction:row;
		justify-content: space-around;
		align-items: center;

		.serviceleft {
			.device{
				font-weight: 600;
				font-size: 26rpx;
				color: #00828C;
				margin-bottom: 23rpx;
			}
			
			.detail{
				font-weight: 400;
				font-size: 21rpx;
				color: #4C4948;
				line-height: 32rpx;
			}
		}

		.serviceright {
			width: 150rpx;
			height: 165rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
			.xian{
				position: relative;
				height: 165rpx;
				width:1rpx;
				background-color: #ececec;
			}
			.statu{
				width: 120rpx;
				height: 120rpx;
				border-radius: 50%;
				background-color: #e6e6e6;
				display: flex;
				justify-content: center;
				align-items: center;
				font-weight: 400;
				font-size: 24rpx;
				color: #00828C;
			}
		}
	}
</style>